<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>set</title>
    <script type="text/javascript">
        // map接收一个数组，数组中的元素是键值对数组
        const map = new Map([
            ['key1','value1'],
            ['key2','value2'],
        ]);

        console.log(map.keys());
        console.log(map.values());


        // 或者接收一个set
        const set = new Set([
            ['key1','value1'],
            ['key2','value2'],
        ]);


        const map2 = new Map(set);
        // 或者其它map
        const map3 = new Map(map);


    </script>
</head>
<body>

</body>
</html>